package com.xxx.system.auth;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
@Component
public class InitSystemListener implements ServletContextListener {
    @Autowired
    private PermissionScan permissionScan;
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                permissionScan.scanPermission();
            }
        });
        thread.start();
    }
}


